import request from '@/utils/request'

export function userUpdateInfoService({ id, nickname, email }) {
  return request.put('/my/userinfo', { id, nickname, email })
}

// 更新用户头像
export function userUpdateAvatarService(avatar) {
  return request.patch('/my/update/avatar', { avatar })
}

// 更新用户密码
export function userUpdatePasswordService({ old_pwd, new_pwd, re_pwd }) {
  return request.patch('/my/updatepwd', { old_pwd, new_pwd, re_pwd })
}
